package AccionesSemanticas;

public class AccDoubleRange implements AccSemantica {

    private StringBuilder tokenChars;
    private int[] lineNumber;
    
    public AccDoubleRange(StringBuilder tokenChars, int[] lineNumber){
        this.tokenChars = tokenChars;
        this.lineNumber = lineNumber;
    }
    
    public String doAction() {
        try{
            Double d = new Double(tokenChars.toString().replace("d","e"));
            return null;
        }
        catch (Exception e){
            return new String("Linea " + lineNumber[0] +": Constante double fuera de rango permitido");
        }
    }    
}
